﻿using System;
using System.IO;
using GC_FFW.Common.Abstractions.Interfaces.Helpers;

namespace GC_FFW.Common.Abstractions.Helpers
{
	public abstract class BaseApplicationConfiguration : IApplicationConfiguration
	{
		#region IApplicationConfiguration Members

		public string GetPath(string data)
		{
			return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Get(data) ?? string.Empty);
		}

		public string TeamNamesDataFilePath
		{
			get { return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Get("TeamNamesDataFilePath") ?? string.Empty); }
		}

		public string PlayerNamesDataFilePath
		{
			get { return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Get("PlayerNamesDataFilePath") ?? string.Empty); }
		}

		#endregion

		#region Abstractions

		public abstract string Get(string name);

		public abstract void Set(string name, string value);

		#endregion
	}
}
